package com.procidanapps.imisteridiprocida;



import com.google.analytics.tracking.android.EasyTracker;
import com.procidanapps.imisteridiprocida.R;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;

public class PrefsActivity extends PreferenceActivity{
private static final String OPT_username = "username";
private static final String OPT_username_DEF = "Confratello";
private static final String OPT_audio = "music";

SharedPreferences prefs;
	
@Override
protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   addPreferencesFromResource(R.layout.activity_settings);
}
public static String getUserName(Context context)
{
	return PreferenceManager.getDefaultSharedPreferences(context).getString(OPT_username, OPT_username_DEF);
}

public static boolean getAudioOption(Context context)
{
	return PreferenceManager.getDefaultSharedPreferences(context).getBoolean(OPT_audio, true);
}

@Override
public void onStart() {
  super.onStart();

  EasyTracker.getInstance(this).activityStart(this);  // Add this method.
}

@Override
public void onStop() {
  super.onStop();

  EasyTracker.getInstance(this).activityStop(this);  // Add this method.
}


}